package 蓝桥杯;

import java.math.BigInteger;
import java.util.Scanner;

/**
 * @description:
 * @author: qian
 * @createDate: 2021/11/17
 */
public class 大数 {


    public static void main(String[] args) {
        Scanner s = new Scanner(System.in);
        BigInteger sum = new BigInteger("1");
        BigInteger num = new BigInteger("0");
        int n = s.nextInt();
        for (int i = 1; i <= n; i++) {
            sum = num.add(sum.multiply(new BigInteger(i+"")));
        }
        System.out.println(sum);
    }
}
